﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System.Diagnostics;

namespace ThisIsTheOnlyChamber
{
    public class Door : Object
    {
        private static Model buttonModel;
        float f;

        public Door(Vector3 p, float max = 96f)
            : base( p, buttonModel )
        {
            f = max;
            position = p;
        }

        public static void LoadModel(Model m)
        {
            buttonModel = m;
        }

        public override void ReloadContent(Model m)
        {
            throw new NotImplementedException("It is invalid to call ReloadContent on Button Objects");
        }

        public void MoveDown(GameTime t)
        {
            if (f > 0)
            {
                f -= 48f * (float)t.ElapsedGameTime.TotalSeconds;
                this.position.Y += 48f * (float)t.ElapsedGameTime.TotalSeconds;
            }
        }
        public void MoveUp(GameTime t)
        {
            if (f > 0)
            {
                f -= 48f * (float)t.ElapsedGameTime.TotalSeconds;
                this.position.Y -= 48f * (float)t.ElapsedGameTime.TotalSeconds;
            }
        }
    }
}
